#include "Floor.h"

void DrawFloor(GLint tileSize)
{
	GLboolean alternateColor = false;

	glTranslatef(-25, 0, -25);

	for(GLint i = 0; i < 10; i++)
	{
		for(GLint j = 0; j < 10; j++)
		{
			if (!alternateColor)
				glColor3f(0.5f, 0.5f, 0.5f);
			else
				glColor3f(0.5f, 0.5f, 1.0f);

			glBegin(GL_TRIANGLES);
				glVertex3f(tileSize * j, 0, tileSize * i);
				glVertex3f(tileSize * (j + 1), 0, tileSize * i);
				glVertex3f(tileSize * (j + 1), 0, tileSize * (i + 1));

				glVertex3f(tileSize * j, 0, tileSize * i);
				glVertex3f(tileSize * (j + 1), 0, tileSize * (i + 1));
				glVertex3f(tileSize * j, 0, tileSize * (i + 1));
			glEnd();

			alternateColor = (alternateColor == false ? true : false);
		}
		alternateColor = (alternateColor == false ? true : false);
	}

}